package com.briup.jdk8.day02;

/**
 * 考试的相关案例
 */
public class Test4 {
    public static void main(String[] args) {
        int i = 0;
        foo('A');
        while(foo('B') && (i < 2)) {
            i++;
            foo('D');
            foo('C');
        }
        System.out.println();
        System.out.println("----------");
        split(12);
    }
    public static int split(int number) {
        if (number > 1) {
            if (number % 2 != 0)
                System.out.print(split((number + 1) / 2));
            System.out.print(split(number / 2));
        }
        return number;
    }
    static boolean foo(char c) {
        System.out.print(c);
        return true;
    }
}

